alter table LvReo_MasterList
ADD NetSheet_PurchasePrice_Actual MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_PurchasePrice_Actual BIT NOT NULL DEFAULT(0),
	NetSheet_PurchasePrice_WithLoan MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_PurchasePrice_WithLoan BIT NOT NULL DEFAULT(0),
	
	NetSheet_Total_AcquisitionCost_Estimated MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Total_AcquisitionCost_Estimated BIT NOT NULL DEFAULT(0),
	NetSheet_Total_AcquisitionCost_Actual MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Total_AcquisitionCost_Actual BIT NOT NULL DEFAULT(0),
	NetSheet_Total_AcquisitionCost_WithLoan MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Total_AcquisitionCost_WithLoan BIT NOT NULL DEFAULT(0),
	
	NetSheet_Total_PreparationCost_Estimated MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Total_PreparationCost_Estimated BIT NOT NULL DEFAULT(0),
	NetSheet_Total_PreparationCost_Actual MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Total_PreparationCost_Actual BIT NOT NULL DEFAULT(0),
	NetSheet_Total_PreparationCost_WithLoan MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Total_PreparationCost_WithLoan BIT NOT NULL DEFAULT(0),
	
	NetSheet_Total_PresaleCost_Estimated MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Total_PresaleCost_Estimated BIT NOT NULL DEFAULT(0),
	NetSheet_Total_PresaleCost_Actual MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Total_PresaleCost_Actual BIT NOT NULL DEFAULT(0),
	NetSheet_Total_PresaleCost_WithLoan MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Total_PresaleCost_WithLoan BIT NOT NULL DEFAULT(0),
	
	NetSheet_SellingPrice_Estimated MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_SellingPrice_Estimated BIT NOT NULL DEFAULT(0),
	NetSheet_SellingPrice_Actual MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_SellingPrice_Actual BIT NOT NULL DEFAULT(0),
	NetSheet_SellingPrice_WithLoan MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_SellingPrice_WithLoan BIT NOT NULL DEFAULT(0),
	
	NetSheet_Total_ClosingCost_Estimated MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Total_ClosingCost_Estimated BIT NOT NULL DEFAULT(0),
	NetSheet_Total_ClosingCost_Actual MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Total_ClosingCost_Actual BIT NOT NULL DEFAULT(0),
	NetSheet_Total_ClosingCost_WithLoan MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Total_ClosingCost_WithLoan BIT NOT NULL DEFAULT(0),
	
	NetSheet_Note MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Note BIT NOT NULL DEFAULT(0),
	NetSheet_2ndDOT MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_2ndDOT BIT NOT NULL DEFAULT(0),
	NetSheet_Total_LoanCost MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Total_LoanCost BIT NOT NULL DEFAULT(0),
	
	NetSheet_NetProfit_Estimated MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_NetProfit_Estimated BIT NOT NULL DEFAULT(0),
	NetSheet_NetProfit_Actual MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_NetProfit_Actual BIT NOT NULL DEFAULT(0),
	NetSheet_NetProfit_WithLoan MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_NetProfit_WithLoan BIT NOT NULL DEFAULT(0),
	
	NetSheet_Total_Equity_Estimated MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Total_Equity_Estimated BIT NOT NULL DEFAULT(0),
	NetSheet_Total_Equity_Actual MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Total_Equity_Actual BIT NOT NULL DEFAULT(0),
	NetSheet_Total_Equity_WithLoan MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Total_Equity_WithLoan BIT NOT NULL DEFAULT(0),
	
	NetSheet_Total_NetProfit_Estimated MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Total_NetProfit_Estimated BIT NOT NULL DEFAULT(0),
	NetSheet_Total_NetProfit_Actual MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Total_NetProfit_Actual BIT NOT NULL DEFAULT(0),
	NetSheet_Total_NetProfit_WithLoan MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Total_NetProfit_WithLoan BIT NOT NULL DEFAULT(0),
	
	NetSheet_Total_NetPercent_Estimated MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Total_NetPercent_Estimated BIT NOT NULL DEFAULT(0),
	NetSheet_Total_NetPercent_Actual MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Total_NetPercent_Actual BIT NOT NULL DEFAULT(0),
	NetSheet_Total_NetPercent_WithLoan MONEY NOT NULL DEFAULT(0),
	NetSheet_Manual_Total_NetPercent_WithLoan BIT NOT NULL DEFAULT(0)
GO	
ALTER PROCEDURE [dbo].[getNetSheet]
(
	@PropertyId INT
)
AS
BEGIN
	SET NOCOUNT ON
	
	SELECT Apn,
		dbo.fnCastAsMoneyOrZero(BuyerPurchasePrice) as BuyerPurchasePrice,
		dbo.fnCastAsMoneyOrZero(PurchasePrice) as PurchasePrice,
		dbo.fnCastAsMoneyOrZero(RehabCosts) as RehabCosts,
		NetSheet_LockChange_Estimated, NetSheet_LockChange_Actual, NetSheet_LockChange_WithLoan, 
		NetSheet_ReserveForUtilites_Estimated, NetSheet_ReserveForUtilites_Actual, NetSheet_ReserveForUtilites_WithLoan, 
		NetSheet_Insurance_Estimated, NetSheet_Insurance_Actual, NetSheet_Insurance_WithLoan, 
		NetSheet_CashForKeys_Estimated, NetSheet_CashForKeys_Actual, NetSheet_CashForKeys_WithLoan, 
		NetSheet_Miscellaenous_Estimated, NetSheet_Miscellaenous_Actual, NetSheet_Miscellaenous_WithLoan, 
		NetSheet_BrokerCoop, NetSheet_SellerClosingIncentives, NetSheet_EscrowClosingEstimate, 
		NetSheet_SellersCostRepairs_Estimated, NetSheet_SellersCostRepairs_Actual, NetSheet_SellersCostRepairs_WithLoan, 
		NetSheet_HomeWarranty_Estimated, NetSheet_HomeWarranty_Actual, NetSheet_HomeWarranty_WithLoan, 
		NetSheet_Appraisal_Estimated, NetSheet_Appraisal_Actual, NetSheet_Appraisal_WithLoan, 
		NetSheet_MiscellaneousClosingCosts_Estimated, NetSheet_MiscellaneousClosingCosts_Actual, NetSheet_MiscellaneousClosingCosts_WithLoan, 
		NetSheet_HOADues_Estimated, NetSheet_HOADues_Actual, NetSheet_HOADues_WithLoan, 
		NetSheet_TransactionFee_Estimated, NetSheet_TransactionFee_Actual, NetSheet_TransactionFee_WithLoan, 
		NetSheet_Other_Estimated, NetSheet_Other_Actual, NetSheet_Other_WithLoan, 
		NetSheet_FeeLCH,
		
		NetSheet_NonProfitFee, NetSheet_ClosingCosts, 
		NetSheet_LoanBrokerFee, NetSheet_LoanFee, NetSheet_LoanInterest,
		
		NetSheet_RehabCost_Estimated, NetSheet_RehabCost_Actual, NetSheet_RehabCost_WithLoan,
		NetSheet_1stDOT, NetSheet_DownPayment,
		
		NetSheet_SellingPrice, NetSheet_MortgageType, NetSheet_EstClosingDate,
		NetSheet_WithLoan,
		
		NetSheet_ClosingCosts_Estimated, NetSheet_ClosingCosts_Actual, NetSheet_ClosingCosts_WithLoan,
		NetSheet_Manual_ClosingCosts_Estimated, NetSheet_Manual_ClosingCosts_Actual, NetSheet_Manual_ClosingCosts_WithLoan,
		NetSheet_Occupancy, NetSheet_AcquisitionDate,
		NetSheet_NonProfitFee_Estimated, NetSheet_NonProfitFee_Actual, NetSheet_NonProfitFee_WithLoan, NetSheet_Manual_NonProfitFee_Estimated, NetSheet_Manual_NonProfitFee_Actual, NetSheet_Manual_NonProfitFee_WithLoan, 
		NetSheet_Broker_Estimated, NetSheet_Broker_Actual, NetSheet_Broker_WithLoan, NetSheet_Manual_Broker_Estimated, NetSheet_Manual_Broker_Actual, NetSheet_Manual_Broker_WithLoan, 
		NetSheet_SellerClosing_Estimated, NetSheet_SellerClosing_Actual, NetSheet_SellerClosing_WithLoan, NetSheet_Manual_SellerClosing_Estimated, NetSheet_Manual_SellerClosing_Actual, NetSheet_Manual_SellerClosing_WithLoan, 
		NetSheet_Escrow_Estimated, NetSheet_Escrow_Actual, NetSheet_Escrow_WithLoan, NetSheet_Manual_Escrow_Estimated, NetSheet_Manual_Escrow_Actual, NetSheet_Manual_Escrow_WithLoan,
		NetSheet_ProfitParticipation_Estimated, NetSheet_ProfitParticipation_Actual, NetSheet_ProfitParticipation_WithLoan, NetSheet_Manual_ProfitParticipation_Estimated, NetSheet_Manual_ProfitParticipation_Actual, NetSheet_Manual_ProfitParticipation_WithLoan, 
		NetSheet_LoanFeeSumma, NetSheet_Manual_LoanFee,
		NetSheet_LoanInterestSumma, NetSheet_Manual_LoanInterest,
		
		NetSheet_PurchasePrice_Actual, NetSheet_Manual_PurchasePrice_Actual, NetSheet_PurchasePrice_WithLoan, NetSheet_Manual_PurchasePrice_WithLoan, 
		NetSheet_Total_AcquisitionCost_Estimated, NetSheet_Manual_Total_AcquisitionCost_Estimated, NetSheet_Total_AcquisitionCost_Actual, NetSheet_Manual_Total_AcquisitionCost_Actual, NetSheet_Total_AcquisitionCost_WithLoan, NetSheet_Manual_Total_AcquisitionCost_WithLoan, 
		NetSheet_Total_PreparationCost_Estimated, NetSheet_Manual_Total_PreparationCost_Estimated, NetSheet_Total_PreparationCost_Actual, NetSheet_Manual_Total_PreparationCost_Actual, NetSheet_Total_PreparationCost_WithLoan, NetSheet_Manual_Total_PreparationCost_WithLoan, 
		NetSheet_Total_PresaleCost_Estimated, NetSheet_Manual_Total_PresaleCost_Estimated, NetSheet_Total_PresaleCost_Actual, NetSheet_Manual_Total_PresaleCost_Actual, NetSheet_Total_PresaleCost_WithLoan, NetSheet_Manual_Total_PresaleCost_WithLoan, 
		NetSheet_SellingPrice_Estimated, NetSheet_Manual_SellingPrice_Estimated, NetSheet_SellingPrice_Actual, NetSheet_Manual_SellingPrice_Actual, NetSheet_SellingPrice_WithLoan, NetSheet_Manual_SellingPrice_WithLoan, 
		NetSheet_Total_ClosingCost_Estimated, NetSheet_Manual_Total_ClosingCost_Estimated, NetSheet_Total_ClosingCost_Actual, NetSheet_Manual_Total_ClosingCost_Actual, NetSheet_Total_ClosingCost_WithLoan, NetSheet_Manual_Total_ClosingCost_WithLoan, 
		NetSheet_Note, NetSheet_Manual_Note, NetSheet_2ndDOT, NetSheet_Manual_2ndDOT, NetSheet_Total_LoanCost, NetSheet_Manual_Total_LoanCost, NetSheet_NetProfit_Estimated, 
		NetSheet_Manual_NetProfit_Estimated, NetSheet_NetProfit_Actual, NetSheet_Manual_NetProfit_Actual, NetSheet_NetProfit_WithLoan, NetSheet_Manual_NetProfit_WithLoan, 
		NetSheet_Total_Equity_Estimated, NetSheet_Manual_Total_Equity_Estimated, NetSheet_Total_Equity_Actual, NetSheet_Manual_Total_Equity_Actual, NetSheet_Total_Equity_WithLoan, NetSheet_Manual_Total_Equity_WithLoan, 
		NetSheet_Total_NetProfit_Estimated, NetSheet_Manual_Total_NetProfit_Estimated, NetSheet_Total_NetProfit_Actual, NetSheet_Manual_Total_NetProfit_Actual, NetSheet_Total_NetProfit_WithLoan, NetSheet_Manual_Total_NetProfit_WithLoan, 
		NetSheet_Total_NetPercent_Estimated, NetSheet_Manual_Total_NetPercent_Estimated, NetSheet_Total_NetPercent_Actual, NetSheet_Manual_Total_NetPercent_Actual, NetSheet_Total_NetPercent_WithLoan, NetSheet_Manual_Total_NetPercent_WithLoan
	FROM LvReo_MasterList
	WHERE PropertyId = @PropertyId		
END
GO
ALTER PROCEDURE [dbo].[updateNetSheetFields]
(
    @PropertyId        int,
    
    @BuyerPurchasePrice int = null,
    @PurchasePrice int = null,
    @RehabCosts int,
    @NetProfit int = 0,
	
	@NetSheet_LockChange_Estimated MONEY,
	@NetSheet_LockChange_Actual MONEY,
	@NetSheet_LockChange_WithLoan MONEY,
	@NetSheet_ReserveForUtilites_Estimated MONEY,
	@NetSheet_ReserveForUtilites_Actual MONEY,
	@NetSheet_ReserveForUtilites_WithLoan MONEY,
	@NetSheet_Insurance_Estimated MONEY,
	@NetSheet_Insurance_Actual MONEY,
	@NetSheet_Insurance_WithLoan MONEY,
	@NetSheet_CashForKeys_Estimated MONEY,
	@NetSheet_CashForKeys_Actual MONEY,
	@NetSheet_CashForKeys_WithLoan MONEY,
	@NetSheet_Miscellaenous_Estimated MONEY,
	@NetSheet_Miscellaenous_Actual MONEY,
	@NetSheet_Miscellaenous_WithLoan MONEY,
	@NetSheet_BrokerCoop MONEY,
	@NetSheet_SellerClosingIncentives MONEY,
	@NetSheet_EscrowClosingEstimate MONEY,
	@NetSheet_SellersCostRepairs_Estimated MONEY,
	@NetSheet_SellersCostRepairs_Actual MONEY,
	@NetSheet_SellersCostRepairs_WithLoan MONEY,
	@NetSheet_HomeWarranty_Estimated MONEY,
	@NetSheet_HomeWarranty_Actual MONEY,
	@NetSheet_HomeWarranty_WithLoan MONEY,
	@NetSheet_Appraisal_Estimated MONEY,
	@NetSheet_Appraisal_Actual MONEY,
	@NetSheet_Appraisal_WithLoan MONEY,
	@NetSheet_MiscellaneousClosingCosts_Estimated MONEY,
	@NetSheet_MiscellaneousClosingCosts_Actual MONEY,
	@NetSheet_MiscellaneousClosingCosts_WithLoan MONEY,
	@NetSheet_HOADues_Estimated MONEY,
	@NetSheet_HOADues_Actual MONEY,
	@NetSheet_HOADues_WithLoan MONEY,
	@NetSheet_TransactionFee_Estimated MONEY,
	@NetSheet_TransactionFee_Actual MONEY,
	@NetSheet_TransactionFee_WithLoan MONEY,
	@NetSheet_Other_Estimated MONEY,
	@NetSheet_Other_Actual MONEY,
	@NetSheet_Other_WithLoan MONEY,
	@NetSheet_FeeLCH MONEY,
	@NetSheet_NonProfitFee MONEY,
	@NetSheet_ClosingCosts MONEY,
	@NetSheet_LoanBrokerFee MONEY,
	@NetSheet_LoanFee MONEY,
	@NetSheet_LoanInterest MONEY,
	
	@NetSheet_RehabCost_Estimated MONEY,
	@NetSheet_RehabCost_Actual MONEY,
	@NetSheet_RehabCost_WithLoan MONEY,
	
	@NetSheet_1stDOT MONEY,
	@NetSheet_DownPayment MONEY,
	
	@NetSheet_SellingPrice MONEY,
	@NetSheet_MortgageType VARCHAR(50),
	@NetSheet_EstClosingDate VARCHAR(50),
	
	@NetSheet_WithLoan BIT,
	
	@NetSheet_ClosingCosts_Estimated MONEY,
	@NetSheet_ClosingCosts_Actual MONEY,
	@NetSheet_ClosingCosts_WithLoan MONEY,
	@NetSheet_Manual_ClosingCosts_Estimated BIT,
	@NetSheet_Manual_ClosingCosts_Actual BIT,
	@NetSheet_Manual_ClosingCosts_WithLoan BIT,
	@NetSheet_Occupancy varchar(10),
	
	@NetSheet_NonProfitFee_Estimated MONEY,
	@NetSheet_NonProfitFee_Actual MONEY,
	@NetSheet_NonProfitFee_WithLoan MONEY,
	@NetSheet_Manual_NonProfitFee_Estimated BIT,
	@NetSheet_Manual_NonProfitFee_Actual BIT,
	@NetSheet_Manual_NonProfitFee_WithLoan BIT,
	@NetSheet_Broker_Estimated MONEY,
	@NetSheet_Broker_Actual MONEY,
	@NetSheet_Broker_WithLoan MONEY,
	@NetSheet_Manual_Broker_Estimated BIT,
	@NetSheet_Manual_Broker_Actual BIT,
	@NetSheet_Manual_Broker_WithLoan BIT,
	@NetSheet_SellerClosing_Estimated MONEY,
	@NetSheet_SellerClosing_Actual MONEY,
	@NetSheet_SellerClosing_WithLoan MONEY,
	@NetSheet_Manual_SellerClosing_Estimated BIT,
	@NetSheet_Manual_SellerClosing_Actual BIT,
	@NetSheet_Manual_SellerClosing_WithLoan BIT,
	@NetSheet_Escrow_Estimated MONEY,
	@NetSheet_Escrow_Actual MONEY,
	@NetSheet_Escrow_WithLoan MONEY,
	@NetSheet_Manual_Escrow_Estimated BIT,
	@NetSheet_Manual_Escrow_Actual BIT,
	@NetSheet_Manual_Escrow_WithLoan BIT,
	
	@NetSheet_ProfitParticipation_Estimated MONEY,
	@NetSheet_ProfitParticipation_Actual MONEY,
	@NetSheet_ProfitParticipation_WithLoan MONEY,
	@NetSheet_Manual_ProfitParticipation_Estimated BIT,
	@NetSheet_Manual_ProfitParticipation_Actual BIT,
	@NetSheet_Manual_ProfitParticipation_WithLoan BIT,
	@NetSheet_LoanFeeSumma MONEY, 
	@NetSheet_Manual_LoanFee BIT,
	@NetSheet_LoanInterestSumma MONEY, 
	@NetSheet_Manual_LoanInterest BIT,
	
	@NetSheet_PurchasePrice_Actual MONEY,
	@NetSheet_Manual_PurchasePrice_Actual BIT,
	@NetSheet_PurchasePrice_WithLoan MONEY,
	@NetSheet_Manual_PurchasePrice_WithLoan BIT,
	@NetSheet_Total_AcquisitionCost_Estimated MONEY,
	@NetSheet_Manual_Total_AcquisitionCost_Estimated BIT,
	@NetSheet_Total_AcquisitionCost_Actual MONEY,
	@NetSheet_Manual_Total_AcquisitionCost_Actual BIT,
	@NetSheet_Total_AcquisitionCost_WithLoan MONEY,
	@NetSheet_Manual_Total_AcquisitionCost_WithLoan BIT,
	@NetSheet_Total_PreparationCost_Estimated MONEY,
	@NetSheet_Manual_Total_PreparationCost_Estimated BIT,
	@NetSheet_Total_PreparationCost_Actual MONEY,
	@NetSheet_Manual_Total_PreparationCost_Actual BIT,
	@NetSheet_Total_PreparationCost_WithLoan MONEY,
	@NetSheet_Manual_Total_PreparationCost_WithLoan BIT,
	@NetSheet_Total_PresaleCost_Estimated MONEY,
	@NetSheet_Manual_Total_PresaleCost_Estimated BIT,
	@NetSheet_Total_PresaleCost_Actual MONEY,
	@NetSheet_Manual_Total_PresaleCost_Actual BIT,
	@NetSheet_Total_PresaleCost_WithLoan MONEY,
	@NetSheet_Manual_Total_PresaleCost_WithLoan BIT,
	@NetSheet_SellingPrice_Estimated MONEY,
	@NetSheet_Manual_SellingPrice_Estimated BIT,
	@NetSheet_SellingPrice_Actual MONEY,
	@NetSheet_Manual_SellingPrice_Actual BIT,
	@NetSheet_SellingPrice_WithLoan MONEY,
	@NetSheet_Manual_SellingPrice_WithLoan BIT,
	@NetSheet_Total_ClosingCost_Estimated MONEY,
	@NetSheet_Manual_Total_ClosingCost_Estimated BIT,
	@NetSheet_Total_ClosingCost_Actual MONEY,
	@NetSheet_Manual_Total_ClosingCost_Actual BIT,
	@NetSheet_Total_ClosingCost_WithLoan MONEY,
	@NetSheet_Manual_Total_ClosingCost_WithLoan BIT,
	@NetSheet_Note MONEY,
	@NetSheet_Manual_Note BIT,
	@NetSheet_2ndDOT MONEY,
	@NetSheet_Manual_2ndDOT BIT,
	@NetSheet_Total_LoanCost MONEY,
	@NetSheet_Manual_Total_LoanCost BIT,
	@NetSheet_NetProfit_Estimated MONEY,
	@NetSheet_Manual_NetProfit_Estimated BIT,
	@NetSheet_NetProfit_Actual MONEY,
	@NetSheet_Manual_NetProfit_Actual BIT,
	@NetSheet_NetProfit_WithLoan MONEY,
	@NetSheet_Manual_NetProfit_WithLoan BIT,
	@NetSheet_Total_Equity_Estimated MONEY,
	@NetSheet_Manual_Total_Equity_Estimated BIT,
	@NetSheet_Total_Equity_Actual MONEY,
	@NetSheet_Manual_Total_Equity_Actual BIT,
	@NetSheet_Total_Equity_WithLoan MONEY,
	@NetSheet_Manual_Total_Equity_WithLoan BIT,
	@NetSheet_Total_NetProfit_Estimated MONEY,
	@NetSheet_Manual_Total_NetProfit_Estimated BIT,
	@NetSheet_Total_NetProfit_Actual MONEY,
	@NetSheet_Manual_Total_NetProfit_Actual BIT,
	@NetSheet_Total_NetProfit_WithLoan MONEY,
	@NetSheet_Manual_Total_NetProfit_WithLoan BIT,
	@NetSheet_Total_NetPercent_Estimated MONEY,
	@NetSheet_Manual_Total_NetPercent_Estimated BIT,
	@NetSheet_Total_NetPercent_Actual MONEY,
	@NetSheet_Manual_Total_NetPercent_Actual BIT,
	@NetSheet_Total_NetPercent_WithLoan MONEY,
	@NetSheet_Manual_Total_NetPercent_WithLoan BIT
)
AS

BEGIN
	UPDATE LvReo_MasterList
	SET BuyerPurchasePrice = ISNULL(@BuyerPurchasePrice, BuyerPurchasePrice), PurchasePrice = ISNULL(cast(@PurchasePrice as varchar), PurchasePrice),
		RehabCosts = @RehabCosts, NetProfit = @NetProfit,
		NetSheet_LockChange_Estimated = @NetSheet_LockChange_Estimated, NetSheet_LockChange_Actual = @NetSheet_LockChange_Actual, NetSheet_LockChange_WithLoan = @NetSheet_LockChange_WithLoan, 
		NetSheet_ReserveForUtilites_Estimated = @NetSheet_ReserveForUtilites_Estimated, NetSheet_ReserveForUtilites_Actual = @NetSheet_ReserveForUtilites_Actual, NetSheet_ReserveForUtilites_WithLoan = @NetSheet_ReserveForUtilites_WithLoan, 
		NetSheet_Insurance_Estimated = @NetSheet_Insurance_Estimated, NetSheet_Insurance_Actual = @NetSheet_Insurance_Actual, NetSheet_Insurance_WithLoan = @NetSheet_Insurance_WithLoan, 
		NetSheet_CashForKeys_Estimated = @NetSheet_CashForKeys_Estimated, NetSheet_CashForKeys_Actual = @NetSheet_CashForKeys_Actual, NetSheet_CashForKeys_WithLoan = @NetSheet_CashForKeys_WithLoan, 
		NetSheet_Miscellaenous_Estimated = @NetSheet_Miscellaenous_Estimated, NetSheet_Miscellaenous_Actual = @NetSheet_Miscellaenous_Actual, NetSheet_Miscellaenous_WithLoan = @NetSheet_Miscellaenous_WithLoan, 
		NetSheet_BrokerCoop = @NetSheet_BrokerCoop, NetSheet_SellerClosingIncentives = @NetSheet_SellerClosingIncentives, NetSheet_EscrowClosingEstimate = @NetSheet_EscrowClosingEstimate, 
		NetSheet_SellersCostRepairs_Estimated = @NetSheet_SellersCostRepairs_Estimated, NetSheet_SellersCostRepairs_Actual = @NetSheet_SellersCostRepairs_Actual, NetSheet_SellersCostRepairs_WithLoan = @NetSheet_SellersCostRepairs_WithLoan, 
		NetSheet_HomeWarranty_Estimated = @NetSheet_HomeWarranty_Estimated, NetSheet_HomeWarranty_Actual = @NetSheet_HomeWarranty_Actual, NetSheet_HomeWarranty_WithLoan = @NetSheet_HomeWarranty_WithLoan, 
		NetSheet_Appraisal_Estimated = @NetSheet_Appraisal_Estimated, NetSheet_Appraisal_Actual = @NetSheet_Appraisal_Actual, NetSheet_Appraisal_WithLoan = @NetSheet_Appraisal_WithLoan, 
		NetSheet_MiscellaneousClosingCosts_Estimated = @NetSheet_MiscellaneousClosingCosts_Estimated, NetSheet_MiscellaneousClosingCosts_Actual = @NetSheet_MiscellaneousClosingCosts_Actual, NetSheet_MiscellaneousClosingCosts_WithLoan = @NetSheet_MiscellaneousClosingCosts_WithLoan, 
		NetSheet_HOADues_Estimated = @NetSheet_HOADues_Estimated, NetSheet_HOADues_Actual = @NetSheet_HOADues_Actual, NetSheet_HOADues_WithLoan = @NetSheet_HOADues_WithLoan, 
		NetSheet_TransactionFee_Estimated = @NetSheet_TransactionFee_Estimated, NetSheet_TransactionFee_Actual = @NetSheet_TransactionFee_Actual, NetSheet_TransactionFee_WithLoan = @NetSheet_TransactionFee_WithLoan, 
		NetSheet_Other_Estimated = @NetSheet_Other_Estimated, NetSheet_Other_Actual = @NetSheet_Other_Actual, NetSheet_Other_WithLoan = @NetSheet_Other_WithLoan, 
		NetSheet_FeeLCH = @NetSheet_FeeLCH,
		NetSheet_NonProfitFee = @NetSheet_NonProfitFee, NetSheet_ClosingCosts = @NetSheet_ClosingCosts,
		NetSheet_LoanBrokerFee = @NetSheet_LoanBrokerFee, NetSheet_LoanFee = @NetSheet_LoanFee, NetSheet_LoanInterest = @NetSheet_LoanInterest,
		
		NetSheet_RehabCost_Estimated = @NetSheet_RehabCost_Estimated, NetSheet_RehabCost_Actual = @NetSheet_RehabCost_Actual, NetSheet_RehabCost_WithLoan = @NetSheet_RehabCost_WithLoan,
		NetSheet_1stDOT = @NetSheet_1stDOT, NetSheet_DownPayment = @NetSheet_DownPayment,
		NetSheet_SellingPrice = @NetSheet_SellingPrice, NetSheet_MortgageType = @NetSheet_MortgageType, NetSheet_EstClosingDate = @NetSheet_EstClosingDate,
		NetSheet_WithLoan = @NetSheet_WithLoan,
		NetSheet_ClosingCosts_Estimated = @NetSheet_ClosingCosts_Estimated, NetSheet_ClosingCosts_Actual = @NetSheet_ClosingCosts_Actual, NetSheet_ClosingCosts_WithLoan = @NetSheet_ClosingCosts_WithLoan,
		NetSheet_Manual_ClosingCosts_Estimated = @NetSheet_Manual_ClosingCosts_Estimated, NetSheet_Manual_ClosingCosts_Actual = @NetSheet_Manual_ClosingCosts_Actual, NetSheet_Manual_ClosingCosts_WithLoan = @NetSheet_Manual_ClosingCosts_WithLoan,
		NetSheet_Occupancy = @NetSheet_Occupancy,
		
		NetSheet_NonProfitFee_Estimated = @NetSheet_NonProfitFee_Estimated, NetSheet_NonProfitFee_Actual = @NetSheet_NonProfitFee_Actual, NetSheet_NonProfitFee_WithLoan = @NetSheet_NonProfitFee_WithLoan, NetSheet_Manual_NonProfitFee_Estimated = @NetSheet_Manual_NonProfitFee_Estimated, NetSheet_Manual_NonProfitFee_Actual = @NetSheet_Manual_NonProfitFee_Actual, NetSheet_Manual_NonProfitFee_WithLoan = @NetSheet_Manual_NonProfitFee_WithLoan, 
		NetSheet_Broker_Estimated = @NetSheet_Broker_Estimated, NetSheet_Broker_Actual = @NetSheet_Broker_Actual, NetSheet_Broker_WithLoan = @NetSheet_Broker_WithLoan, NetSheet_Manual_Broker_Estimated = @NetSheet_Manual_Broker_Estimated, NetSheet_Manual_Broker_Actual = @NetSheet_Manual_Broker_Actual, NetSheet_Manual_Broker_WithLoan = @NetSheet_Manual_Broker_WithLoan, 
		NetSheet_SellerClosing_Estimated = @NetSheet_SellerClosing_Estimated, NetSheet_SellerClosing_Actual = @NetSheet_SellerClosing_Actual, NetSheet_SellerClosing_WithLoan = @NetSheet_SellerClosing_WithLoan, NetSheet_Manual_SellerClosing_Estimated = @NetSheet_Manual_SellerClosing_Estimated, NetSheet_Manual_SellerClosing_Actual = @NetSheet_Manual_SellerClosing_Actual, NetSheet_Manual_SellerClosing_WithLoan = @NetSheet_Manual_SellerClosing_WithLoan, 
		NetSheet_Escrow_Estimated = @NetSheet_Escrow_Estimated, NetSheet_Escrow_Actual = @NetSheet_Escrow_Actual, NetSheet_Escrow_WithLoan = @NetSheet_Escrow_WithLoan, NetSheet_Manual_Escrow_Estimated = @NetSheet_Manual_Escrow_Estimated, NetSheet_Manual_Escrow_Actual = @NetSheet_Manual_Escrow_Actual, NetSheet_Manual_Escrow_WithLoan = @NetSheet_Manual_Escrow_WithLoan,
		
		NetSheet_ProfitParticipation_Estimated = @NetSheet_ProfitParticipation_Estimated, NetSheet_ProfitParticipation_Actual = @NetSheet_ProfitParticipation_Actual, NetSheet_ProfitParticipation_WithLoan = @NetSheet_ProfitParticipation_WithLoan, NetSheet_Manual_ProfitParticipation_Estimated = @NetSheet_Manual_ProfitParticipation_Estimated, NetSheet_Manual_ProfitParticipation_Actual = @NetSheet_Manual_ProfitParticipation_Actual, NetSheet_Manual_ProfitParticipation_WithLoan = @NetSheet_Manual_ProfitParticipation_WithLoan, 
		NetSheet_LoanFeeSumma = @NetSheet_LoanFeeSumma, NetSheet_Manual_LoanFee = @NetSheet_Manual_LoanFee, NetSheet_LoanInterestSumma = @NetSheet_LoanInterestSumma, NetSheet_Manual_LoanInterest = @NetSheet_Manual_LoanInterest,
		NetSheet_PurchasePrice_Actual = @NetSheet_PurchasePrice_Actual, NetSheet_Manual_PurchasePrice_Actual = @NetSheet_Manual_PurchasePrice_Actual, NetSheet_PurchasePrice_WithLoan = @NetSheet_PurchasePrice_WithLoan, NetSheet_Manual_PurchasePrice_WithLoan = @NetSheet_Manual_PurchasePrice_WithLoan, 
		NetSheet_Total_AcquisitionCost_Estimated = @NetSheet_Total_AcquisitionCost_Estimated, NetSheet_Manual_Total_AcquisitionCost_Estimated = @NetSheet_Manual_Total_AcquisitionCost_Estimated, NetSheet_Total_AcquisitionCost_Actual = @NetSheet_Total_AcquisitionCost_Actual, NetSheet_Manual_Total_AcquisitionCost_Actual = @NetSheet_Manual_Total_AcquisitionCost_Actual, NetSheet_Total_AcquisitionCost_WithLoan = @NetSheet_Total_AcquisitionCost_WithLoan, NetSheet_Manual_Total_AcquisitionCost_WithLoan = @NetSheet_Manual_Total_AcquisitionCost_WithLoan, 
		NetSheet_Total_PreparationCost_Estimated = @NetSheet_Total_PreparationCost_Estimated, NetSheet_Manual_Total_PreparationCost_Estimated = @NetSheet_Manual_Total_PreparationCost_Estimated, NetSheet_Total_PreparationCost_Actual = @NetSheet_Total_PreparationCost_Actual, NetSheet_Manual_Total_PreparationCost_Actual = @NetSheet_Manual_Total_PreparationCost_Actual, NetSheet_Total_PreparationCost_WithLoan = @NetSheet_Total_PreparationCost_WithLoan, NetSheet_Manual_Total_PreparationCost_WithLoan = @NetSheet_Manual_Total_PreparationCost_WithLoan, 
		NetSheet_Total_PresaleCost_Estimated = @NetSheet_Total_PresaleCost_Estimated, NetSheet_Manual_Total_PresaleCost_Estimated = @NetSheet_Manual_Total_PresaleCost_Estimated, NetSheet_Total_PresaleCost_Actual = @NetSheet_Total_PresaleCost_Actual, NetSheet_Manual_Total_PresaleCost_Actual = @NetSheet_Manual_Total_PresaleCost_Actual, NetSheet_Total_PresaleCost_WithLoan = @NetSheet_Total_PresaleCost_WithLoan, NetSheet_Manual_Total_PresaleCost_WithLoan = @NetSheet_Manual_Total_PresaleCost_WithLoan, 
		NetSheet_SellingPrice_Estimated = @NetSheet_SellingPrice_Estimated, NetSheet_Manual_SellingPrice_Estimated = @NetSheet_Manual_SellingPrice_Estimated, NetSheet_SellingPrice_Actual = @NetSheet_SellingPrice_Actual, NetSheet_Manual_SellingPrice_Actual = @NetSheet_Manual_SellingPrice_Actual, NetSheet_SellingPrice_WithLoan = @NetSheet_SellingPrice_WithLoan, NetSheet_Manual_SellingPrice_WithLoan = @NetSheet_Manual_SellingPrice_WithLoan, 
		NetSheet_Total_ClosingCost_Estimated = @NetSheet_Total_ClosingCost_Estimated, NetSheet_Manual_Total_ClosingCost_Estimated = @NetSheet_Manual_Total_ClosingCost_Estimated, NetSheet_Total_ClosingCost_Actual = @NetSheet_Total_ClosingCost_Actual, NetSheet_Manual_Total_ClosingCost_Actual = @NetSheet_Manual_Total_ClosingCost_Actual, NetSheet_Total_ClosingCost_WithLoan = @NetSheet_Total_ClosingCost_WithLoan, NetSheet_Manual_Total_ClosingCost_WithLoan = @NetSheet_Manual_Total_ClosingCost_WithLoan, 
		NetSheet_Note = @NetSheet_Note, NetSheet_Manual_Note = @NetSheet_Manual_Note, NetSheet_2ndDOT = @NetSheet_2ndDOT, NetSheet_Manual_2ndDOT = @NetSheet_Manual_2ndDOT, NetSheet_Total_LoanCost = @NetSheet_Total_LoanCost, NetSheet_Manual_Total_LoanCost = @NetSheet_Manual_Total_LoanCost, 
		NetSheet_NetProfit_Estimated = @NetSheet_NetProfit_Estimated, NetSheet_Manual_NetProfit_Estimated = @NetSheet_Manual_NetProfit_Estimated, NetSheet_NetProfit_Actual = @NetSheet_NetProfit_Actual, NetSheet_Manual_NetProfit_Actual = @NetSheet_Manual_NetProfit_Actual, NetSheet_NetProfit_WithLoan = @NetSheet_NetProfit_WithLoan, NetSheet_Manual_NetProfit_WithLoan = @NetSheet_Manual_NetProfit_WithLoan, 
		NetSheet_Total_Equity_Estimated = @NetSheet_Total_Equity_Estimated, NetSheet_Manual_Total_Equity_Estimated = @NetSheet_Manual_Total_Equity_Estimated, NetSheet_Total_Equity_Actual = @NetSheet_Total_Equity_Actual, NetSheet_Manual_Total_Equity_Actual = @NetSheet_Manual_Total_Equity_Actual, NetSheet_Total_Equity_WithLoan = @NetSheet_Total_Equity_WithLoan, NetSheet_Manual_Total_Equity_WithLoan = @NetSheet_Manual_Total_Equity_WithLoan, 
		NetSheet_Total_NetProfit_Estimated = @NetSheet_Total_NetProfit_Estimated, NetSheet_Manual_Total_NetProfit_Estimated = @NetSheet_Manual_Total_NetProfit_Estimated, NetSheet_Total_NetProfit_Actual = @NetSheet_Total_NetProfit_Actual, NetSheet_Manual_Total_NetProfit_Actual = @NetSheet_Manual_Total_NetProfit_Actual, NetSheet_Total_NetProfit_WithLoan = @NetSheet_Total_NetProfit_WithLoan, NetSheet_Manual_Total_NetProfit_WithLoan = @NetSheet_Manual_Total_NetProfit_WithLoan, 
		NetSheet_Total_NetPercent_Estimated = @NetSheet_Total_NetPercent_Estimated, NetSheet_Manual_Total_NetPercent_Estimated = @NetSheet_Manual_Total_NetPercent_Estimated, NetSheet_Total_NetPercent_Actual = @NetSheet_Total_NetPercent_Actual, NetSheet_Manual_Total_NetPercent_Actual = @NetSheet_Manual_Total_NetPercent_Actual, NetSheet_Total_NetPercent_WithLoan = @NetSheet_Total_NetPercent_WithLoan, NetSheet_Manual_Total_NetPercent_WithLoan = @NetSheet_Manual_Total_NetPercent_WithLoan
	WHERE PropertyId = @PropertyId		
END
GO